<div style="margin-top: 0px;">
    <div class="table_browse_header"><img src="/images/comments.gif" align="middle"><b>Comments</b></div>
    <!-- <div class="table_browse_content"> <%= render :partial => 'search_form_comment' %> </div>-->
    <table width="100%">
	<tbody>
	    <tr>
		<th class="table_browse_field_header">Approved?</th>
		<th class="table_browse_field_header">Comment</th>
		<th class="table_browse_field_header">Added By</th>
		<th class="table_browse_field_header">Article</th>
		<th class="table_browse_field_header" width="1">&nbsp;</th>
	    </tr>
	    <% if @comments.empty? %>
	    <tr>
		<td class="table_browse_rows_2" align="center" colspan = 5>There are no comments</td>
	    </tr>
	    <% else
		for comment in @comments %>
	    <tr>
		<td class="table_browse_rows_2" align="center">
		<% if comment.approved %>
		    <font color="green"><b>YES</b></font>
		<% else %>
		    <font color="red"><b>NO</b></font>
		<% end %></td>
		<td class="table_browse_rows_2" align="left"><%= comment.content %></td>
		<td class="table_browse_rows_2" align="center"><b><%= comment.name%></b>&nbsp;&lt;<%= "#{comment.email}" if !comment.email.empty?%>&gt;</td>
		<td class="table_browse_rows_2" align="left"><%= comment.article.title %>&nbsp; (<%=link_to comment.article.category.name, :action=> 'list_category' %>)</td>
		<td class="table_browse_rows_2" valign="center"><%= link_to 'Approve', {:action => 'approve_comment', :id=> comment}%>&nbsp;|&nbsp;<%= link_to 'Destroy', {:action => 'destroy_comment', :id=> comment}, :confirm => "Are you sure?"%></td>
	    </tr>
	    <%	end 
	       end%>
	</tbody>
    </table><br>     
    <div class="table_browse_controls"><center>&nbsp;&nbsp;&nbsp; <%= @comments.length*@comment_pages.length %> comments found. &nbsp;&nbsp;
    <% if @comment_pages.length > 1 %>
	Pages: <%= pagination_links(@comment_pages)%>
    <%end%>&nbsp;&nbsp;&nbsp;</center></div>
</div>